﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CadastroVaga.aspx.cs" Inherits="PortalCurriculo.WebUI.Selecionadores.CadastroVaga" %>

<%@ Register Assembly="PortalCurriculo.Util.Controls" Namespace="PortalCurriculo.Util.Controls.Wizard"
    TagPrefix="portal" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagPrefix="portal" Namespace="PortalCurriculo.Util.CustomControls" Assembly="PortalCurriculo.Util.CustomControls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageTitle" runat="server">
    <asp:Label runat="server" ID="lblPageTitle" Text="Cadastro de vaga" CssClass="pageTitle" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel runat="server" ID="updVaga"> 
        <ContentTemplate>
            <asp:TabContainer ID="tabVaga" runat="server" ActiveTabIndex="0">
                <asp:TabPanel runat="server" ID="TabDadosCorporativos" HeaderText="Dados corporativos" >
                    <ContentTemplate>
                        <table cellspacing="10px" width="100%">
                            <tr>
                                <td style="width:147px;"><asp:Label ID="lblEmpresa" runat="server" Text="Empresa" /></td>
                                <td>
                                    <asp:DropDownList ID="ddlEmpresa" runat="server" Width="70%" />&nbsp;
                                    <asp:CheckBox runat="server" ID="chkNaoInformarDados" Text="Confidencial" />
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblSelecionador" runat="server" Text="Selecionador principal" /></td>
                                <td><asp:TextBox ID="txtSelecionador" runat="server" Width="100%" /></td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblLocalizacao" runat="server" Text="Local da oportunidade" /></td>
                                <td><asp:CheckBox runat="server" ID="chkLocalizacao" 
                                        Text="Mesma localização da empresa" AutoPostBack="True" Checked="True" 
                                        OnCheckedChanged="chkLocalizacao_CheckedChanged" /></td>
                            </tr>
                            <asp:Panel runat="server" ID="pnlLocalizacao" Visible="False" >
                                <tr>
                                    <td><asp:Label ID="LabelCEP" runat="server" Text="CEP" /></td>
                                    <td>
                                        <asp:TextBox runat="server" ID="TextBoxCEP" MaxLength="8" AutoPostBack="True" />
                                        <asp:CheckBox runat="server" ID="chkForaBrasil" Text="Fora do Brasil" 
                                            AutoPostBack="True" />
                                        <portal:MaskedEdit ID="MaskEditCEP" runat="server" Type="CEP" 
                                            TargetControlID="TextBoxCEP" CultureAMPMPlaceholder="" 
                                            CultureCurrencySymbolPlaceholder="" CultureDateFormat="" 
                                            CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />  
                                        <portal:MaskEditValidator ID="MaskEditValidatorCEP" 
                                            ControlToValidate="TextBoxCEP" ControlExtender="MaskEditCEP"
                                            runat="server" CssClass="failureNotification" IsValidEmpty="False" Display="Dynamic"
                                            EmptyValueMessage="CEP deve ser preenchido" EmptyValueBlurredText="*"
                                            InvalidValueMessage="CEP inválido" InvalidValueBlurredMessage="*" 
                                            ValidationGroup="ValidationGroupEndereco" 
                                            ErrorMessage="MaskEditValidatorCEP" />

                                        <asp:UpdateProgress runat="server" ID="UpdateProgress" AssociatedUpdatePanelID="updVaga">
                                            <ProgressTemplate>
                                                <asp:Image runat="server" ID="ImageLoading" ImageUrl="~/Files/Layout/Loading.gif" AlternateText="Carregando" 
                                                    width="21" Height="21"/>
                                            </ProgressTemplate>
                                        </asp:UpdateProgress>
                                    </td>
                                </tr>
                                <tr>
                                    <td><asp:Label ID="lblCidade" runat="server" Text="Cidade" /></td>
                                    <td>
                                        <asp:TextBox ID="txtCidade" runat="server" Width="100%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td><asp:Label ID="lblUnidadeFederativa" runat="server" Text="Estado" /></td>
                                    <td>
                                        <asp:TextBox ID="txtUnidadeFederativa" runat="server" Width="100%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td><asp:Label ID="lblPais" runat="server" Text="País" /></td>
                                    <td>
                                        <asp:DropDownList ID="ddlPais" runat="server" Width="100%" />   
                                    </td>
                                </tr>
                            </asp:Panel>
                        </table>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" ID="tabDadosVaga" HeaderText="Dados da vaga" >
                    <ContentTemplate>
                        <table cellspacing="10px" width="100%">
                            <tr>
                                <td style="width:130px;"><asp:Label ID="lblArea" runat="server" Text="Área" /></td>
                                <td colspan="2"><asp:DropDownList ID="ddlArea" runat="server" Width="100%" 
                                        OnSelectedIndexChanged="ddlArea_SelectedIndexChanged" 
                                        AutoPostBack="True" /></td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblEspecializacaoArea" runat="server" Text="Especialização" /></td>
                                <td style="width:300px;"><asp:DropDownList ID="ddlEspecializacaoArea" runat="server" Width="100%" 
                                        OnSelectedIndexChanged="ddlEspecializacaoArea_SelectedIndexChanged" 
                                        AutoPostBack="True" /></td>
                                <td style="width:30px;">
                                    <asp:UpdateProgress runat="server" ID="uppEspecializacaoArea" AssociatedUpdatePanelID="updVaga">
                                        <ProgressTemplate>
                                            <asp:Image runat="server" ID="imgLoadingEspecializacaoArea" ImageUrl="~/Files/Layout/Loading.gif" AlternateText="Carregando" 
                                                width="21" Height="21"/>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblCargo" runat="server" Text="Cargo" /></td>
                                <td><asp:DropDownList ID="ddlCargo" runat="server" Width="100%" /></td>
                                <td>
                                    <asp:UpdateProgress runat="server" ID="uppCargo" AssociatedUpdatePanelID="updVaga">
                                        <ProgressTemplate>
                                            <asp:Image runat="server" ID="imgLoadingCargo" ImageUrl="~/Files/Layout/Loading.gif" AlternateText="Carregando" 
                                                width="21" Height="21"/>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblNivelProfissional" runat="server" Text="Nível" /></td>
                                <td colspan="2"><asp:DropDownList ID="ddlNivelProfissional" runat="server"/></td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblFormaContratacao" runat="server" Text="Forma de contratação" /></td>
                                <td colspan="2"><asp:DropDownList ID="ddlFormaContratacao" runat="server" Width="60%" />
                                <asp:Label ID="lblValor" runat="server" Text="Valor" />
                                <asp:TextBox ID="txtValor" runat="server" Width="60px" /></td>
                            </tr>
                            <tr>
                                <td colspan="3"><asp:Label ID="lblDescricao" runat="server" Text="Descrição da vaga" /></td>
                            </tr>
                            <tr>
                                <td colspan="3"><asp:TextBox ID="txtDescricao" runat="server" TextMode="MultiLine" Width="100%"
                                    Rows="20" /></td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" ID="tabRequisitos" HeaderText="Requisitos" >
                    <ContentTemplate>
                        <table cellspacing="10px" width="100%">
                            <tr>
                                <td colspan="3"><asp:Label ID="lblDeficiente" runat="server" Text="Portador de necessidades especiais?" /></td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:RadioButton runat="server" ID="radDeficienciaIndiferente" GroupName="Deficiencia" Text="Indiferente" Checked="true" />
                                    <asp:RadioButton runat="server" ID="radDeficienciaSim" GroupName="Deficiencia" Text="Sim" />
                                    <asp:RadioButton runat="server" ID="radDeficienciaNao" GroupName="Deficiencia" Text="Não" />
                                </td> 
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblMinimoExperiencia" runat="server" Text="Experiência mínima" /></td>
                                <td><asp:TextBox ID="txtTempoExperienciaMinimo" runat="server" Width="80px" /></td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddlTipoExperienciaMinimo">
                                        <asp:ListItem Text="Mês(es)" Value="M" />
                                        <asp:ListItem Text="Ano(s)" Value="A" />
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="lblMaximoExperiencia" runat="server" Text="Experiência máxima" /></td>
                                <td><asp:TextBox ID="txtTempoExperienciaMaximo" runat="server" Width="80px" /></td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddlTipoExperienciaMaximo">
                                        <asp:ListItem Text="Mês(es)" Value="M" />
                                        <asp:ListItem Text="Ano(s)" Value="A" />
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3"><asp:CheckBox runat="server" ID="chkEmpresaAberta" Text="Empresa aberta" /></td>
                            </tr>
                        </table>
                        <asp:Panel ID="pnlIdioma" runat="server" GroupingText="Idiomas" style="margin-top:-30px;">
                            <table width="100%" style="margin-top:-5px;margin-left:-5px;">
                                <tr style="height:35px">    
                                    <td><asp:Label ID="lblIdioma" runat="server" Text="Idioma" /></td>
                                    <td colspan="2">
                                        <asp:DropDownList runat="server" ID="ddlIdioma" Width="200px" AutoPostBack="true" 
                                            OnSelectedIndexChanged="ddlIdioma_SeletedIndexChanged" />&nbsp;
                                        <asp:Label ID="lblOutro" runat="server" Text="Outro idioma" Visible="false" />
                                        <asp:TextBox ID="txtOutroIdioma" runat="server" Width="150px" Visible="false" />
                                    </td>
                                </tr>
                                <tr>
                                    <td><asp:Label ID="lblNivel" runat="server" Text="Nível" /></td>
                                    <td>
                                        <asp:DropDownList runat="server" ID="ddlNivel" Width="110px" />
                                        <asp:Label ID="lblTipo" runat="server" Text="Tipo" />
                                        <asp:DropDownList runat="server" ID="ddlTipo">
                                            <asp:ListItem Text="Imprescindível" Value="true" />
                                            <asp:ListItem Text="Preferível" Value="false" />
                                        </asp:DropDownList>
                                    </td>
                                    <td><asp:LinkButton ID="lnkAdicionarIdioma" OnClick="lnkAdicionarIdioma_Click" runat="server" Text="Adicionar" /></td>
                                </tr>
                            </table>
                            <portal:ListView ID="lsvIdioma" runat="server" ItemPlaceholderID="phItens" OnItemDataBound="lsvIdioma_ItemDataBound">
                                <LayoutTemplate>
                                    <table width="100%">
                                        <tr>    
                                            <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblIdioma" Text="Idioma" /></td>
                                            <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblNivel" Text="Nível" /></td>
                                            <td style="width:30%;text-align:center;"><asp:Label runat="server" ID="lblTipo" Text="Imprescindível" /></td>
                                            <td style="width:15px;"></td>
                                        <asp:PlaceHolder ID="phItens" runat="server" />
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td><asp:Label runat="server" ID="lblIdioma" /></td>
                                        <td><asp:Label runat="server" ID="lblNivel" /></td>
                                        <td><asp:Label runat="server" ID="lblTipo" /></td>
                                        <td><asp:ImageButton runat="server" ID="imbExcluir" ImageUrl="~/Files/Layout/Excluir.gif" 
                                            OnClientClick="javascript:return confirm('Tem certeza que deseja excluir?');"
                                            OnClick="imbExcluir_Click" /> </td>
                                    </tr>
                                </ItemTemplate>
                                <EmptyDataTemplate>
                                    <asp:Label runat="server" ID="lblVazio" Text="Não há idiomas cadastrados" CssClass="failureNotification" />
                                </EmptyDataTemplate>
                            </portal:ListView>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" ID="tabFases" HeaderText="Fases" >
                    <ContentTemplate>
                        <table cellspacing="10px" width="100%"> 
                            <tr>
                                <td><asp:Label ID="lblTipoEvento" runat="server" Text="Tipo" /></td>
                                <td><asp:DropDownList ID="ddlTipoEvento" runat="server" /></td>
                                <td><asp:Label ID="lblTempoEntrevista" runat="server" Text="Tempo de entrevista" /></td>
                                <td>
                                    <asp:DropDownList ID="ddlTempoEntrevista" runat="server">
                                        <asp:ListItem Text="10 minutos" Value="10" />
                                        <asp:ListItem Text="15 minutos" Value="15" />
                                        <asp:ListItem Text="20 minutos" Value="20" />
                                        <asp:ListItem Text="30 minutos" Value="30" Selected="True" />
                                        <asp:ListItem Text="45 minutos" Value="45" />
                                        <asp:ListItem Text="1 hora" Value="60" />
                                        <asp:ListItem Text="1 hora e 15 minutos" Value="75" />
                                        <asp:ListItem Text="1 hora e 30 minutos" Value="90" />
                                        <asp:ListItem Text="1 hora e 45 minutos" Value="105" />
                                        <asp:ListItem Text="2 horas" Value="120" />
                                        <asp:ListItem Text="2 hora e 15 minutos" Value="135" />
                                        <asp:ListItem Text="2 hora e 30 minutos" Value="150" />
                                        <asp:ListItem Text="2 hora e 45 minutos" Value="165" />
                                        <asp:ListItem Text="3 horas" Value="180" />
                                        <asp:ListItem Text="3 hora e 15 minutos" Value="195" />
                                        <asp:ListItem Text="3 hora e 30 minutos" Value="210" />
                                        <asp:ListItem Text="3 hora e 45 minutos" Value="225" />
                                        <asp:ListItem Text="4 horas" Value="240" />
                                        <asp:ListItem Text="4 hora e 15 minutos" Value="255" />
                                        <asp:ListItem Text="4 hora e 30 minutos" Value="270" />
                                        <asp:ListItem Text="4 hora e 45 minutos" Value="295" />
                                        <asp:ListItem Text="5 horas" Value="310" />
                                    </asp:DropDownList>
                                </td>
                                <tr>
                                    <td colspan="4">
                                        <asp:CheckBox runat="server" ID="chkMultiplosProfissionais" Text="Mais de um profissional simultaneamente" />&nbsp;&nbsp;&nbsp;
                                        &nbsp;&nbsp;&nbsp;<asp:Label ID="lblMaximoProfissionais" runat="server" Text="Quantidade max." />
                                        <asp:TextBox runat="server" ID="txtMaximoProfissionais" Width="40px" MaxLength="3" />
                                    </td>    
                                </tr>
                                <tr>
                                    <td colspan="4"><asp:Label ID="lblDescricaoEvento" runat="server" Text="Descrição" /></td>
                                </tr>
                                <tr>
                                    <td colspan="4"><asp:TextBox runat="server" ID="txtDescricaoEvento" 
                                        TextMode="MultiLine" Width="100%" Rows="4" MaxLength="500" /></td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="right">
                                        <asp:LinkButton ID="lnkAdicionarEvento" runat="server" Text="Adicionar evento" OnClick="lnkAdicionarEvento_Click" />
                                    </td>
                                </tr>
                            </tr>
                        </table>
                        <portal:ListView ID="lsvEvento" runat="server" ItemPlaceholderID="phItens" OnItemDataBound="lsvEvento_ItemDataBound">
                            <LayoutTemplate>
                                <table width="100%">
                                    <tr>    
                                        <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblTipoEvento" Text="Tipo" /></td>
                                        <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblTempo" Text="Termpo de entrevista" /></td>
                                        <td style="width:10%;text-align:center;"><asp:Label runat="server" ID="lblMaximoProfissionais" Text="Qtde Max." /></td>
                                        <td style="width:15px;"></td>
                                    <asp:PlaceHolder ID="phItens" runat="server" />
                                </table>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><asp:Label runat="server" ID="lblTipoEvento" /></td>
                                    <td><asp:Label runat="server" ID="lblTempo" /></td>
                                    <td><asp:Label runat="server" ID="lblMaximoProfissionais" /></td>
                                    <td><asp:ImageButton runat="server" ID="imbExcluirEvento" ImageUrl="~/Files/Layout/Excluir.gif" 
                                        OnClientClick="javascript:return confirm('Tem certeza que deseja excluir?');"
                                        OnClick="imbExcluirEvento_Click" /> </td>
                                </tr>
                            </ItemTemplate>
                            <EmptyDataTemplate>
                                <asp:Label runat="server" ID="lblVazio" Text="Não há eventos cadastrados" CssClass="failureNotification" />
                            </EmptyDataTemplate>
                        </portal:ListView>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" ID="tabConsultorias" HeaderText="Consultorias" >
                    <ContentTemplate>
                        <asp:CheckBox ID="chkUsarConsultorias" runat="server" Text="Enviar vagas para minhas consultorias" 
                            AutoPostBack="true" OnCheckedChanged="chkUsarConsultorias_CheckedChange"/><br /><br />
                        <portal:ListView ID="lsvConsultoria" runat="server" ItemPlaceholderID="phItens" OnItemDataBound="lsvConsultoria_ItemDataBound">
                            <LayoutTemplate>
                                <table width="100%">
                                    <tr>    
                                        <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblConsultoria" Text="Consultoria" /></td>
                                        <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblSite" Text="Site" /></td>
                                        <td style="width:15px;"></td>
                                    <asp:PlaceHolder ID="phItens" runat="server" />
                                </table>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><asp:Label runat="server" ID="lblConsultoria" /></td>
                                    <td><asp:Label runat="server" ID="lblSite" /></td>
                                    <td><asp:CheckBox runat="server" ID="chkEnviarVaga" /></td>
                                </tr>
                            </ItemTemplate>
                            <EmptyDataTemplate>
                                <asp:Label runat="server" ID="lblVazio" Text="Não há consultorias cadastradas" CssClass="failureNotification" />
                            </EmptyDataTemplate>
                        </portal:ListView>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
            <asp:LinkButton runat="server" ID="lnkSalvar" Text="Salvar"  />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


